home *** CD-ROM | disk | FTP | other *** search
- .Na "dbgetoff"
- .Aa
- .Fu
- Check for the existence of \*N constructs in the command buffer.
- .Ih "\*N constructs, checking for"
- .Ih "DBOFFSET option"
- .Ih "offsets to \*N constructs"
- .Sy
- .Sf "int dbgetoff(dbproc, offtype, startfrom)"
- .Sp DBPROCESS *dbproc
- .Sp DBUSMALLINT\ offtype
- .Sp int startfrom
- .Co
- .Bl
- If the DBOFFSET option has been set (see the
- .I options
- manual page), this routine can check for the location of certain
- \*N constructs in the command buffer. As a simple example, assume
- the program doesn't know the contents of the command buffer
- but needs to know where the SQL keyword SELECT appears:
- .ta +4n +4n +4n +4n +4n +4n
- .SD
- .so dbgetoff.ex
- .ED
- In this example, select_offset[0] = 0 and select_offset[1] = 15.
- .Bz
- .Pa
- .Pi dbproc
- A pointer to the DBPROCESS structure that provides the connection
- for a particular front-end/\*S process. It contains all the
- information that \*L uses to manage communications and data between the
- front end and \*S.
- .Pi offtype
- The type of offset you want to find. The types are defined in the
- .Ih "offsets, types of"
- header file \f2sybdb.h\f1 and are:
- .sp 0.5v
- .nf
- .in +5n
- .ne 9
- OFF_SELECT
- OFF_FROM
- OFF_ORDER
- OFF_COMPUTE
- OFF_TABLE
- OFF_PROCEDURE
- OFF_STATEMENT
- OFF_PARAM
- OFF_EXEC
- .in -5n
- .fi
- .sp 0.5v
- See the \f2options\f1 manual page for details.
- .sp
- .Pi startfrom
- The point in the buffer to start looking. The command buffer
- begins at 0.
- .in -.375i
- .Re
- .br
- The character offset into the command buffer for the specified offset.
- If the offset is not found, -1 is returned.
- .Sa
- dbcmd,
- dbgetchar,
- dbsetopt,
- dbstrcpy,
- dbstrlen,
- options
-